<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<jsp:include page="loginstatus.jsp" />
<%@ page import="model.*" %>
<%@ taglib prefix="s" uri="/struts-tags" %>   
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'importTeacher.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	
	<link rel="stylesheet" type="text/css" href="css/common.css">
	

  </head>
  
  <body>
  <div id="main">
  <fieldset>
  	<legend>
  		学生成绩信息
  	</legend>
  	
  	<table>
  		<tr class="trTitle">
  			<td>课程</td><td>课程类别</td><td>老师</td><td>考试分</td><td>平时分</td><td>总分数</td><td>学期</td>
  		</tr>
  		<%
  		int i=1;
  		 %>
	   		<s:iterator value="scores" status="score"> 
	   	<tr <%if(i%2==0) out.print("class='trstyle1'"); else out.print("class='trstyle2'");%>>
			<td>
				<s:iterator value="courses[#score.index]" status="course">
					<s:property id="course" value="coursename" />
				</s:iterator>
			</td>
			<td>
				<s:iterator value="coursetypes[#score.index]" status="coursetype">
					<s:property id="coursetype" value="coursetype" />
				</s:iterator>
			</td>
			<td>	
				<s:iterator value="teachers[#score.index]" status="teacher">
					<a href="studentgetteacherbyid.action?id=<s:property id="teacher" value="id" />"><s:property id="teacher" value="teachername" /></a>
				</s:iterator>
			</td>
			<td><s:property id="score" value="kaoshifen" /></td>
			<td><s:property id="score" value="pingshifen" /></td>
			<td><s:property id="score" value="pingshifen+kaoshifen" /></td>
			<td>	
				<s:iterator value="studentcourses[#score.index]" status="studentcourse">
					<s:property id="studentcourse" value="xueqi" />
				</s:iterator>
			</td>
		</tr>
		<%
		i++;
		 %>
		</s:iterator> 
		
	</table>
  </fieldset>
  </div>
 
  </body>
</html>